<script src="jquery-1.5.1.min.js"></script>
<script type="application/x-javascript">
$(document).ready(function() {
   
   //$(document).keypress(function() { alert('ok'); });
    
   
});
</script>

<div id="truc" onKeyDown="alert('lol');" style="background: red; width: 200px; height: 200px;">sdsqsd</div>